﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using Microsoft.ApplicationBlocks.Data;


namespace VideoWorld
{
    public class VideoInfo : System.Web.UI.Page
    {
        protected System.Web.UI.WebControls.Image VideoImage;
        ArrayList videoInfo = new ArrayList();
        protected System.Web.UI.WebControls.Label lbName;
        protected System.Web.UI.WebControls.Label lbType;
        protected System.Web.UI.WebControls.Label lbPerformer;
        protected System.Web.UI.WebControls.Label lbLanguage;
        protected System.Web.UI.WebControls.Label lbAuthor;
        protected System.Web.UI.WebControls.Label lbMaker;
        protected System.Web.UI.WebControls.Label lbSummary;


        //调用函数GetVideo得到影片详细信息．
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request["ID"] != null)
                {
                    videoInfo = DataAccess.Videos.GetVideoInfo(Request["ID"].ToString(), videoInfo);
                    lbName.Text = videoInfo[0].ToString();//得到影片名称
                    lbType.Text = videoInfo[1].ToString();//得到影片文件格式
                    lbAuthor.Text = videoInfo[2].ToString();//得到影片导演信息
                    lbPerformer.Text = videoInfo[3].ToString();//得到影片演员信息
                    lbMaker.Text = videoInfo[4].ToString();//得到影片出厂信息
                    lbLanguage.Text = videoInfo[5].ToString();//得到影片配音信息
                    VideoImage.ImageUrl = videoInfo[6].ToString();//得到影片图片信息
                    lbSummary.Text = videoInfo[7].ToString();//得到影片简介信息

                }
            }
            this.DataBind();
        }

        #region Web Form Designer generated code
        override protected void OnInit(EventArgs e)
        {
            InitializeComponent();
            base.OnInit(e);
        }
        private void InitializeComponent()
        {
            this.Load += new System.EventHandler(this.Page_Load);

        }
        #endregion
    }
}
